<?php

namespace App\Http\Controllers\Home;
use Illuminate\Http\Request;
use DB;
use App\Http\Requsets;
use App\Http\Controllers\Controller;

class ReviewController extends Controller{
	public function review($id){

		$gid=7;	
    $goods = DB::table('shop_goods')->where('gid',$gid)->first();
		//$goods = DB::table('shop_goods')
		     //   ->join('cate','shop_cate.cid','=','shop_goods.cate_cid')
		     //   ->select('shop_goods.*','shop_cate.name as names')
		      //  ->where('shop_goods.gid',$gid)
		       // ->first();
          //  dd($goods);
		$id=4;
       $user= DB::table('shop_users')->where('id',$id)->first();
      
		        //读取当前分类商品
		     //   $cateGoods = DB::table('shop_goods')
		      //  ->where('cate_cid',$shop_goods->cate_gid)
		      //  ->orderBy('gid','desc')
		      //  ->limit(4)
		      //  ->get();
              // dd($cateGoods);
		           return view('home.common.review',['user'=>$user,'goods'=>$goods]);
	}
}
